<?xml version='1.0' encoding='utf-8'?>
<package xmlns="http://www.idpf.org/2007/opf" unique-identifier="bookid" version="2.0">
    <metadata xmlns:opf="http://www.idpf.org/2007/opf" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:calibre="http://calibre.kovidgoyal.net/2009/metadata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dc="http://purl.org/dc/elements/1.1/">
        <meta name="cover" content="cover" />
        <dc:title>{{ title }}</dc:title>
        <dc:language>zh</dc:language>
        <dc:date>{{ post_at|date:'c' }}</dc:date>
        <dc:creator opf:role="aut">{{ author }}</dc:creator>
        <dc:identifier id="bookid">{{ uuid }}</dc:identifier>
    </metadata>
    <manifest>
        <item href="cover_image.jpg" id="cover" media-type="image/jpeg" /> {% for chapter in chapters %}
        <item href="chapter_{{chapter.sort_no}}.html" id="chapter_{{chapter.sort_no}}" media-type="application/xhtml+xml" /> {% if chapter.href == '#' %} {% for child in chapter.children %}
        <item href="chapter_{{child.sort_no}}.html" id="chapter_{{child.sort_no}}" media-type="application/xhtml+xml" /> {% endfor %} {% endif %} {% endfor %}
        <item href="stylesheet.css" id="css" media-type="text/css" />
        <item href="titlepage.xhtml" id="titlepage" media-type="application/xhtml+xml" />
        <item href="toc.ncx" id="ncx" media-type="application/x-dtbncx+xml" /> {% for img in images %}
        <item href="images/{{img}}" id="img-{{forloop.counter}}" media-type="image/jpeg" /> {% endfor %}
    </manifest>
    <spine toc="ncx">
        <itemref idref="titlepage" /> {% for chapter in chapters %}
        <itemref idref="chapter_{{chapter.sort_no}}" /> {% if chapter.href == '#' %} {% for child in chapter.children %}
        <itemref idref="chapter_{{child.sort_no}}" /> {% endfor %} {% endif %} {% endfor %}
    </spine>
    <guide>
        <!--<reference type="toc" title="Table of Contents" href="index.html" />-->
        <reference href="titlepage.xhtml" title="Title Page" type="cover" />
    </guide>
</package>